module helper {

    export class UtilsManager {

        public static remove(obj: egret.DisplayObject): boolean {
            if (obj != null && obj.parent != null) {
                obj.parent.removeChild(obj);
                return true;
            }
            return false;
        }

        public static removeAllChildren(container: egret.DisplayObjectContainer): void {
            while (container.numChildren > 0) {
                container.removeChildAt(0);
            }
        }

    }

}